package com.filldream.fastboot.core.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.filldream.fastboot.base.entity.DatabaseBean;
import com.filldream.fastboot.base.entity.GenTable;
import com.filldream.fastboot.base.request.pc.database.DatabaseSTO;
import com.filldream.fastboot.base.request.pc.database.DownCodeSTO;
import com.filldream.fastboot.base.response.pc.database.ColumnInfo;
import com.filldream.fastboot.common.entity.P;
import com.filldream.fastboot.common.entity.R;
import com.filldream.fastboot.common.exception.GlobalException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface DatabaseService extends IService<DatabaseBean> {

    P<DatabaseBean> list(DatabaseSTO databaseSTO);

    R<List<ColumnInfo>> column(DatabaseSTO databaseSTO);

    //这里的这个t是因为下载地址上不能出现所以，这个试下你就知道了
    void downLoadCode(HttpServletResponse response, DownCodeSTO downCodeSTO, String t) throws GlobalException, IOException;




    R<GenTable> tableConfig(DatabaseSTO databaseSTO);

    R<GenTable> modifyTableConfig(GenTable genTable);

    R<Object> codeDetail(String tableName, Integer genType) throws IOException;

    void down(String tableName, HttpServletRequest request, HttpServletResponse response);

    R<GenTable> refresh(String tableName);

}
